1. Field of the Invention
The present invention generally relates to an audio code, and more particularly, to a built-in self test (BIST) method for an audio codec.
2. Description of Related Art
Typically, au audio codec is often employed in an electronic product for processing speech or music, such as a pen recorder, or an MP3 player. Performance of the audio codec must be tested during a mass production. FIG. 1 shows a conventional test method. As shown in FIG. 1, an audio codec 110 includes a digital-to-analog converter (DAC) 111, and an analog-to-digital converter (ADC) 112. A test signal that is a digital sine wave having a frequency of 1 KHz is provided to the DAC 111. The DAC 111 converts the test signal 121 into an analog signal 122. Then, the ADC 112 converts the analog signal 122 into a digital signal 123. Therefore, a signal to noise and distortion ratio (SNDR) analysis is executed to the digital signal 123, and a result can be obtained thereby. Typically, a fast Fourier transform (FFT) is calculated to the digital signal 123, and a spectrum thereof is analysed. Ideally, there would be a spectral component of 1 KHz only. However, when noises of other frequencies are too strong, the audio codec is generally believed as being failed in the quality test.
This method can be used for testing the DAC and the ADC of the codec at the same time. When testing the DAC only, the test signal can be directly inputted to the DAC, and an SNDR analysis can be conducted to the analog signal outputted from the DAC. Likewise, when testing the ADC only, the test signal can be directly inputted to the ADC, and an SNDR analysis can be conducted to the digital signal outputted from the ADC.
Provision of the test signal and analysis of the test result require additional circuits or equipment, as shown in FIGS. 2 and 3. Referring to FIG. 2, it shows a mixed-signal test equipment 220 for providing a test signal and a clock signal for the test, and conducting an SNDR analysis to the signal fed back from au audio codec 210. Such a mixed-signal test equipment 220 is very expensive, and is capable of providing many types of tests. Unfortunately, it is very expansive and complicated in setting the test environment.
FIG. 3 shows a self test method. Referring to FIG. 3, an audio codec 310 includes a digital signal processor (DSP) core 313. The DSP core 313 provides a test signal and conducts an SNDR analysis to a signal fed back from the DAC 311 or the ADC 312. An external logic test equipment is provided for providing a clock signal for the test. Comparatively, the cost for the DSP core 313 and the logic test equipment 320 is cheaper than the cost for the mixed-signal test equipment 220, and the test environment is convenient to set. However, this self test method is adapted to only a limited amount of tests. Further, a DSP core must be included in a chip of the audio codec, and thus correspondingly increasing the area and the cost of the chip.